#ifndef DIRECTXMODEL_H
#define DIRECTXMODEL_H

#include "DirectXEngine.h"

class DXModel
{
	public:
		DXModel (LPDIRECT3DDEVICE9 DrawDevice, LPCWSTR FileName = NULL);
		~DXModel (void);

		BOOL LoadFromFile (LPCWSTR FileName);
		void Draw (void);

		void Rotate (float Xdeg, float Ydeg, float Zdeg);
		void Translate (float X, float Y, float Z);
		void Scale (float XVal, float YVal, float ZVal);

	private:
		void ExtractMaterialInfo (void);

		LPDIRECT3DDEVICE9 Device;
		LPDIRECT3DTEXTURE9* Textures;
		LPD3DXMESH	Model;
		D3DMATERIAL9* Materials;
		LPD3DXBUFFER MaterialBuffer;
		DWORD NumMaterials;
		D3DXMATRIX Translation;
		D3DXMATRIX Rotation;
		D3DXMATRIX Scalar;
		D3DXMATRIX Transformation;
};

#endif